const express = require('express')
const bodyParser = require('body-parser')
const mongo = require('./config/db')
const routes = require('./router/index')
const app = new express()

mongo(app)

app.use(bodyParser.json())
app.use(bodyParser.urlencoded({extended: false}))

routes(app)

app.listen(3000,() => {
    console.log('ok')
})
